digraph pcb_data {
	ranksep=1.3
	PCBType_misc [label="misc fields:\nID\nName\nFileName\ncolors\ndrc settings\ncursor coords\ngrid\nlayergroups\nroute styles\npadstack protos\n..."]
	PCBType_flags [label="flags:\nChanged\nViaOn (vias drawn?)\n..."]
	pcb_board_t -> PCBType_misc
	pcb_board_t -> PCBType_flags
	pcb_board_t -> pcb_data_t
	pcb_board_t [shape=box]

	pcb_data_t2 [label="another level of\npcb_data_t\n..." shape=none]

	pcb_subc_t [shape=box style=filled color="#aaffaa"]
	pcb_rat_line_t [shape=box style=filled color="#aaffaa"]
	pcb_pstk_t [shape=box style=filled color="#aaffaa"]
	pcb_padstack_proto_t [shape=box]
	pcb_arc_t [shape=box style=filled color="#aaffaa"]
	pcb_gfx_t [shape=box style=filled color="#aaffaa"]
	pcb_line_t [shape=box style=filled color="#aaffaa"]
	pcb_text_t [shape=box style=filled color="#aaffaa"]
	pcb_poly_t [shape=box style=filled color="#aaffaa"]

	PCB [label="extern pcb_board_t PCB\nglobal variable\nholding the current\nboard" shape=diamond]
	PCB -> pcb_board_t

	Buffers [label="extern pcb_buffer_t Buffers[]\nglobal variable holding\nall paste buffers" shape=diamond]
	Buffers -> pcb_buffer_t

	BufferType_misc [label="misc fields:\nbounding box\noffset"]
	pcb_buffer_t -> BufferType_misc
	pcb_buffer_t -> pcb_data_t
	pcb_buffer_t [shape=box]

	DataType_listrt [label="layer-independent lists and rtrees"]
	DataType_LayerN [label="LayerN: number of\nlayers in use"]
	DataType_layers [label="an array of layers"]
	DataType_misc [label="misc fields"]

	pcb_data_t -> DataType_misc    [tailport=s]
	pcb_data_t -> DataType_LayerN  [tailport=s]
	pcb_data_t -> DataType_layers  [tailport=s]
	pcb_data_t -> DataType_listrt  [tailport=s]
	pcb_data_t -> DataType_rtrees  [tailport=s]
	pcb_data_t [shape=box]

	DataType_layers -> pcb_layer_t

	DataType_listrt -> pcb_subc_t
	DataType_listrt -> pcb_rat_line_t
	DataType_listrt -> pcb_pstk_t
	DataType_listrt -> pcb_padstack_proto_t

	pcb_subc_t -> pcb_data_t2
	pcb_pstk_t -> pcb_padstack_proto_t [constraint=no color=blue label="id\nref."]

	LayerType_lines [label="list and rtree of lines"]
	LayerType_arcs [label="list and rtree of arcs"]
	LayerType_gfxs [label="list and rtree of gfxs"]
	LayerType_texts [label="list and rtree of text objects"]
	LayerType_polygons [label="list and rtree of polygons"]
	LayerType_misc [label="misc fields:\nflags\ncolors"]

	LayerType_lines -> pcb_line_t
	LayerType_arcs -> pcb_arc_t
	LayerType_gfxs -> pcb_gfx_t
	LayerType_polygons -> pcb_poly_t
	LayerType_texts -> pcb_text_t

	pcb_layer_t -> LayerType_misc
	pcb_layer_t -> LayerType_lines
	pcb_layer_t -> LayerType_arcs
	pcb_layer_t -> LayerType_gfxs
	pcb_layer_t -> LayerType_texts
	pcb_layer_t -> LayerType_polygons
	pcb_layer_t [shape=box]

	subgraph "cluster_1" {
		label="LEGEND"
		style=filled
		bgcolor=grey
		round [label="round:\nstruct field"]
		struct [label="box:\nstruct" shape=box]
		diamond [label="diamond:\nglobal variable" shape=diamond]
		grn [label="green:\ndrawing primitive" shape=box style=filled color="#aaffaa"]

	}

	pcb_poly_t -> struct [style=invis]
}

